package com.jlkf.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jlkf.service.AdvertisingManagerService;

@Controller
@RequestMapping("advertisingManager")
public class AdvertisingManagerController {

	@Autowired
	private AdvertisingManagerService advertisingManagerService;
	
	/**
	 * 
	 * @param title
	 * @param type  1启动页 2引导页
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	@RequestMapping("getList")
	public Object getList(String  title,Integer type,Integer pageNo,Integer pageSize){
		return advertisingManagerService.getList(title, type,pageNo, pageSize);
	}
	
	@RequestMapping("addOrUpdate")
	@ResponseBody
	public Object addOrUpdate(@RequestBody String json,HttpServletRequest request){
		return advertisingManagerService.addOrUpdate(json,request);
	}
	
	@RequestMapping("del")
	public Object del(Integer id){
		return advertisingManagerService.del(id);
	}
	
	
}
